
class Animal{
    String name;
    int age;
    public void eat(){
        System.out.println(name+"正在吃饭！");
    }
    public void sleep(){
        System.out.println(name+"正在睡觉！");
    }
}
class Dog extends Animal{
    public void bark(){
        System.out.println(name+"正在汪汪叫！");
    }
}

class Cat extends Animal{
    public void mew(){
        System.out.println(name+"正在喵喵喵！");
    }
}

public class Main {
    public static void main(String[] args) {
    Dog dog=new Dog();
    dog.name="小黄";
    dog.age=18;
    System.out.println("继承的特征：");
    System.out.println(dog.name);
    System.out.println(dog.age);
    dog.eat();
    dog.sleep();
    System.out.println("==============================");
    System.out.println("自己独有的特征：");
    dog.bark();
    }
}